/**
 * Copyright (C) BFH www.bfh.ch 2011
 * Code written by: Patrick Dobler, Marc Folly
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package ch.bfh.ti.kybernetik.engine.controller.lightBulb;

import javax.vecmath.Point2d;
import javax.vecmath.Vector2d;

import ch.bfh.ti.kybernetik.engine.model.LightBulb;
import ch.bfh.ti.kybernetik.engine.model.LightSensor;
import ch.bfh.ti.kybernetik.engine.model.Roboter;

/**
 * The Controller Class for a {@link LightBulb} Model. The Class takes care to
 * calculate the amount of light intensity that a given {@link LightBulb} model
 * produces
 * 
 */
public interface LightBulbController {

	/**
	 * 
	 * @return the {@link LightBulb} Model that the {@link LightBulbController}
	 *         is taking care of
	 */
	public abstract LightBulb getLightBulb();

	/**
	 * Calculates the intensity for a {@link LightBulb} model. Due the fact,
	 * that the {@link LightSensor} models are placed relatively to the
	 * {@link Roboter} model we expect tha caller to take care of providing us
	 * the {@link LightSensor} coordinates and {@link LightSensor} view
	 * direction vector since we don't want to have any dependencies in the
	 * {@link LightBulbController} to anything else than {@link LightBulb}
	 * related
	 * 
	 * @param lightSensorPoint
	 *            lightSensor coordinates
	 * @param lightSensor
	 *            {@link LightSensor} model
	 * 
	 * @param lightSensorVector
	 *            lightSensor view direction vector
	 * @return the amount of light intensity for the given paramters
	 */
	public abstract double calculateIntensity(Point2d lightSensorPoint, LightSensor lightSensor, Vector2d lightSensorVector);

}